/**
 * 
 */
package com.conn.service.socket.codec;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolEncoderAdapter;
import org.apache.mina.filter.codec.ProtocolEncoderOutput;

import com.conn.service.socket.resp.ClientResponse;




/**
 * @author lushouzhi
 * 
 */
public class ResponseEncoder extends ProtocolEncoderAdapter {
	
	public void encode(IoSession session, Object message,ProtocolEncoderOutput out) throws Exception {
		out.write(((ClientResponse) message).toClient());
	}

	@Override
	public void dispose(IoSession session) throws Exception {
		super.dispose(session);
	}
	
}
